<?php
	/**
	 * This is a MetaControl class, providing a QForm or QPanel access to event handlers
	 * and QControls to perform the Create, Edit, and Delete functionality
	 * of the BuildVersion class.  This code-generated class
	 * contains all the basic elements to help a QPanel or QForm display an HTML form that can
	 * manipulate a single BuildVersion object.
	 *
	 * To take advantage of some (or all) of these control objects, you
	 * must create a new QForm or QPanel which instantiates a BuildVersionMetaControl
	 * class.
	 *
	 * Any and all changes to this file will be overwritten with any subsequent
	 * code re-generation.
	 *
	 * @package My QCubed Application
	 * @subpackage MetaControls
	 * @property-read BuildVersion $BuildVersion the actual BuildVersion data class being edited
	 * @property QLabel $IdControl
	 * @property-read QLabel $IdLabel
	 * @property QIntegerTextBox $ProjectIdControl
	 * @property-read QLabel $ProjectIdLabel
	 * @property QIntegerTextBox $MajorVersionControl
	 * @property-read QLabel $MajorVersionLabel
	 * @property QIntegerTextBox $MinorVersionControl
	 * @property-read QLabel $MinorVersionLabel
	 * @property QIntegerTextBox $HotPatchControl
	 * @property-read QLabel $HotPatchLabel
	 * @property QIntegerTextBox $ReleaseCandidateControl
	 * @property-read QLabel $ReleaseCandidateLabel
	 * @property QDateTimePicker $DateCreatedControl
	 * @property-read QLabel $DateCreatedLabel
	 * @property QDateTimePicker $DateModifiedControl
	 * @property-read QLabel $DateModifiedLabel
	 * @property QIntegerTextBox $CreateUserIdControl
	 * @property-read QLabel $CreateUserIdLabel
	 * @property QIntegerTextBox $StatusControl
	 * @property-read QLabel $StatusLabel
	 * @property-read string $TitleVerb a verb indicating whether or not this is being edited or created
	 * @property-read boolean $EditMode a boolean indicating whether or not this is being edited or created
	 */

	class BuildVersionMetaControlGen extends QBaseClass {
		// General Variables
		/**
		 * @var BuildVersion objBuildVersion
		 * @access protected
		 */
		protected $objBuildVersion;
		/**
		 * @var QForm|QControl objParentObject
		 * @access protected
		 */
		protected $objParentObject;
		/**
		 * @var string strTitleVerb
		 * @access protected
		 */
		protected $strTitleVerb;
		/**
		 * @var boolean blnEditMode
		 * @access protected
		 */
		protected $blnEditMode;

		// Controls that allow the editing of BuildVersion's individual data fields
		/**
		 * @var QLabel lblId
		 * @access protected
		 */
		protected $lblId;
		/**
		 * @var QIntegerTextBox txtProjectId
		 * @access protected
		 */
		protected $txtProjectId;
		/**
		 * @var QIntegerTextBox txtMajorVersion
		 * @access protected
		 */
		protected $txtMajorVersion;
		/**
		 * @var QIntegerTextBox txtMinorVersion
		 * @access protected
		 */
		protected $txtMinorVersion;
		/**
		 * @var QIntegerTextBox txtHotPatch
		 * @access protected
		 */
		protected $txtHotPatch;
		/**
		 * @var QIntegerTextBox txtReleaseCandidate
		 * @access protected
		 */
		protected $txtReleaseCandidate;
		/**
		 * @var QDateTimePicker calDateCreated
		 * @access protected
		 */
		protected $calDateCreated;
		/**
		 * @var QDateTimePicker calDateModified
		 * @access protected
		 */
		protected $calDateModified;
		/**
		 * @var QIntegerTextBox txtCreateUserId
		 * @access protected
		 */
		protected $txtCreateUserId;
		/**
		 * @var QIntegerTextBox txtStatus
		 * @access protected
		 */
		protected $txtStatus;

		// Controls that allow the viewing of BuildVersion's individual data fields
		/**
		 * @var QLabel lblProjectId
		 * @access protected
		 */
		protected $lblProjectId;
		/**
		 * @var QLabel lblMajorVersion
		 * @access protected
		 */
		protected $lblMajorVersion;
		/**
		 * @var QLabel lblMinorVersion
		 * @access protected
		 */
		protected $lblMinorVersion;
		/**
		 * @var QLabel lblHotPatch
		 * @access protected
		 */
		protected $lblHotPatch;
		/**
		 * @var QLabel lblReleaseCandidate
		 * @access protected
		 */
		protected $lblReleaseCandidate;
		/**
		 * @var QLabel lblDateCreated
		 * @access protected
		 */
		protected $lblDateCreated;
		/**
		 * @var QLabel lblDateModified
		 * @access protected
		 */
		protected $lblDateModified;
		/**
		 * @var QLabel lblCreateUserId
		 * @access protected
		 */
		protected $lblCreateUserId;
		/**
		 * @var QLabel lblStatus
		 * @access protected
		 */
		protected $lblStatus;

		// QListBox Controls (if applicable) to edit Unique ReverseReferences and ManyToMany References

		// QLabel Controls (if applicable) to view Unique ReverseReferences and ManyToMany References


		/**
		 * Main constructor.  Constructor OR static create methods are designed to be called in either
		 * a parent QPanel or the main QForm when wanting to create a
		 * BuildVersionMetaControl to edit a single BuildVersion object within the
		 * QPanel or QForm.
		 *
		 * This constructor takes in a single BuildVersion object, while any of the static
		 * create methods below can be used to construct based off of individual PK ID(s).
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this BuildVersionMetaControl
		 * @param BuildVersion $objBuildVersion new or existing BuildVersion object
		 */
		 public function __construct($objParentObject, BuildVersion $objBuildVersion) {
			// Setup Parent Object (e.g. QForm or QPanel which will be using this BuildVersionMetaControl)
			$this->objParentObject = $objParentObject;

			// Setup linked BuildVersion object
			$this->objBuildVersion = $objBuildVersion;

			// Figure out if we're Editing or Creating New
			if ($this->objBuildVersion->__Restored) {
				$this->strTitleVerb = QApplication::Translate('Edit');
				$this->blnEditMode = true;
			} else {
				$this->strTitleVerb = QApplication::Translate('Create');
				$this->blnEditMode = false;
			}
		 }

		/**
		 * Static Helper Method to Create using PK arguments
		 * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
		 * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
		 * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to
		 * edit, or if we are also allowed to create a new one, etc.
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this BuildVersionMetaControl
		 * @param integer $intId primary key value
		 * @param QMetaControlCreateType $intCreateType rules governing BuildVersion object creation - defaults to CreateOrEdit
 		 * @return BuildVersionMetaControl
		 */
		public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			// Attempt to Load from PK Arguments
			if (strlen($intId)) {
				$objBuildVersion = BuildVersion::Load($intId);

				// BuildVersion was found -- return it!
				if ($objBuildVersion)
					return new BuildVersionMetaControl($objParentObject, $objBuildVersion);

				// If CreateOnRecordNotFound not specified, throw an exception
				else if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)
					throw new QCallerException('Could not find a BuildVersion object with PK arguments: ' . $intId);

			// If EditOnly is specified, throw an exception
			} else if ($intCreateType == QMetaControlCreateType::EditOnly)
				throw new QCallerException('No PK arguments specified');

			// If we are here, then we need to create a new record
			return new BuildVersionMetaControl($objParentObject, new BuildVersion());
		}

		/**
		 * Static Helper Method to Create using PathInfo arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this BuildVersionMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing BuildVersion object creation - defaults to CreateOrEdit
		 * @return BuildVersionMetaControl
		 */
		public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::PathInfo(0);
			return BuildVersionMetaControl::Create($objParentObject, $intId, $intCreateType);
		}

		/**
		 * Static Helper Method to Create using QueryString arguments
		 *
		 * @param mixed $objParentObject QForm or QPanel which will be using this BuildVersionMetaControl
		 * @param QMetaControlCreateType $intCreateType rules governing BuildVersion object creation - defaults to CreateOrEdit
		 * @return BuildVersionMetaControl
		 */
		public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {
			$intId = QApplication::QueryString('intId');
			return BuildVersionMetaControl::Create($objParentObject, $intId, $intCreateType);
		}



		///////////////////////////////////////////////
		// PUBLIC CREATE and REFRESH METHODS
		///////////////////////////////////////////////

		/**
		 * Create and setup QLabel lblId
		 * @param string $strControlId optional ControlId to use
		 * @return QLabel
		 */
		public function lblId_Create($strControlId = null) {
			$this->lblId = new QLabel($this->objParentObject, $strControlId);
			$this->lblId->Name = QApplication::Translate('Id');
			if ($this->blnEditMode)
				$this->lblId->Text = $this->objBuildVersion->Id;
			else
				$this->lblId->Text = 'N/A';
			return $this->lblId;
		}

		/**
		 * Create and setup QIntegerTextBox txtProjectId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtProjectId_Create($strControlId = null) {
			$this->txtProjectId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtProjectId->Name = QApplication::Translate('Project Id');
			$this->txtProjectId->Text = $this->objBuildVersion->ProjectId;
			return $this->txtProjectId;
		}

		/**
		 * Create and setup QLabel lblProjectId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblProjectId_Create($strControlId = null, $strFormat = null) {
			$this->lblProjectId = new QLabel($this->objParentObject, $strControlId);
			$this->lblProjectId->Name = QApplication::Translate('Project Id');
			$this->lblProjectId->Text = $this->objBuildVersion->ProjectId;
			$this->lblProjectId->Format = $strFormat;
			return $this->lblProjectId;
		}

		/**
		 * Create and setup QIntegerTextBox txtMajorVersion
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtMajorVersion_Create($strControlId = null) {
			$this->txtMajorVersion = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtMajorVersion->Name = QApplication::Translate('Major Version');
			$this->txtMajorVersion->Text = $this->objBuildVersion->MajorVersion;
			return $this->txtMajorVersion;
		}

		/**
		 * Create and setup QLabel lblMajorVersion
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblMajorVersion_Create($strControlId = null, $strFormat = null) {
			$this->lblMajorVersion = new QLabel($this->objParentObject, $strControlId);
			$this->lblMajorVersion->Name = QApplication::Translate('Major Version');
			$this->lblMajorVersion->Text = $this->objBuildVersion->MajorVersion;
			$this->lblMajorVersion->Format = $strFormat;
			return $this->lblMajorVersion;
		}

		/**
		 * Create and setup QIntegerTextBox txtMinorVersion
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtMinorVersion_Create($strControlId = null) {
			$this->txtMinorVersion = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtMinorVersion->Name = QApplication::Translate('Minor Version');
			$this->txtMinorVersion->Text = $this->objBuildVersion->MinorVersion;
			return $this->txtMinorVersion;
		}

		/**
		 * Create and setup QLabel lblMinorVersion
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblMinorVersion_Create($strControlId = null, $strFormat = null) {
			$this->lblMinorVersion = new QLabel($this->objParentObject, $strControlId);
			$this->lblMinorVersion->Name = QApplication::Translate('Minor Version');
			$this->lblMinorVersion->Text = $this->objBuildVersion->MinorVersion;
			$this->lblMinorVersion->Format = $strFormat;
			return $this->lblMinorVersion;
		}

		/**
		 * Create and setup QIntegerTextBox txtHotPatch
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtHotPatch_Create($strControlId = null) {
			$this->txtHotPatch = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtHotPatch->Name = QApplication::Translate('Hot Patch');
			$this->txtHotPatch->Text = $this->objBuildVersion->HotPatch;
			return $this->txtHotPatch;
		}

		/**
		 * Create and setup QLabel lblHotPatch
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblHotPatch_Create($strControlId = null, $strFormat = null) {
			$this->lblHotPatch = new QLabel($this->objParentObject, $strControlId);
			$this->lblHotPatch->Name = QApplication::Translate('Hot Patch');
			$this->lblHotPatch->Text = $this->objBuildVersion->HotPatch;
			$this->lblHotPatch->Format = $strFormat;
			return $this->lblHotPatch;
		}

		/**
		 * Create and setup QIntegerTextBox txtReleaseCandidate
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtReleaseCandidate_Create($strControlId = null) {
			$this->txtReleaseCandidate = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtReleaseCandidate->Name = QApplication::Translate('Release Candidate');
			$this->txtReleaseCandidate->Text = $this->objBuildVersion->ReleaseCandidate;
			return $this->txtReleaseCandidate;
		}

		/**
		 * Create and setup QLabel lblReleaseCandidate
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblReleaseCandidate_Create($strControlId = null, $strFormat = null) {
			$this->lblReleaseCandidate = new QLabel($this->objParentObject, $strControlId);
			$this->lblReleaseCandidate->Name = QApplication::Translate('Release Candidate');
			$this->lblReleaseCandidate->Text = $this->objBuildVersion->ReleaseCandidate;
			$this->lblReleaseCandidate->Format = $strFormat;
			return $this->lblReleaseCandidate;
		}

		/**
		 * Create and setup QDateTimePicker calDateCreated
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calDateCreated_Create($strControlId = null) {
			$this->calDateCreated = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calDateCreated->Name = QApplication::Translate('Date Created');
			$this->calDateCreated->DateTime = $this->objBuildVersion->DateCreated;
			$this->calDateCreated->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calDateCreated;
		}

		/**
		 * Create and setup QLabel lblDateCreated
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblDateCreated_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblDateCreated = new QLabel($this->objParentObject, $strControlId);
			$this->lblDateCreated->Name = QApplication::Translate('Date Created');
			$this->strDateCreatedDateTimeFormat = $strDateTimeFormat;
			$this->lblDateCreated->Text = sprintf($this->objBuildVersion->DateCreated) ? $this->objBuildVersion->DateCreated->qFormat($this->strDateCreatedDateTimeFormat) : null;
			return $this->lblDateCreated;
		}

		protected $strDateCreatedDateTimeFormat;


		/**
		 * Create and setup QDateTimePicker calDateModified
		 * @param string $strControlId optional ControlId to use
		 * @return QDateTimePicker
		 */
		public function calDateModified_Create($strControlId = null) {
			$this->calDateModified = new QDateTimePicker($this->objParentObject, $strControlId);
			$this->calDateModified->Name = QApplication::Translate('Date Modified');
			$this->calDateModified->DateTime = $this->objBuildVersion->DateModified;
			$this->calDateModified->DateTimePickerType = QDateTimePickerType::DateTime;
			return $this->calDateModified;
		}

		/**
		 * Create and setup QLabel lblDateModified
		 * @param string $strControlId optional ControlId to use
		 * @param string $strDateTimeFormat optional DateTimeFormat to use
		 * @return QLabel
		 */
		public function lblDateModified_Create($strControlId = null, $strDateTimeFormat = null) {
			$this->lblDateModified = new QLabel($this->objParentObject, $strControlId);
			$this->lblDateModified->Name = QApplication::Translate('Date Modified');
			$this->strDateModifiedDateTimeFormat = $strDateTimeFormat;
			$this->lblDateModified->Text = sprintf($this->objBuildVersion->DateModified) ? $this->objBuildVersion->DateModified->qFormat($this->strDateModifiedDateTimeFormat) : null;
			return $this->lblDateModified;
		}

		protected $strDateModifiedDateTimeFormat;


		/**
		 * Create and setup QIntegerTextBox txtCreateUserId
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtCreateUserId_Create($strControlId = null) {
			$this->txtCreateUserId = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtCreateUserId->Name = QApplication::Translate('Create User Id');
			$this->txtCreateUserId->Text = $this->objBuildVersion->CreateUserId;
			return $this->txtCreateUserId;
		}

		/**
		 * Create and setup QLabel lblCreateUserId
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblCreateUserId_Create($strControlId = null, $strFormat = null) {
			$this->lblCreateUserId = new QLabel($this->objParentObject, $strControlId);
			$this->lblCreateUserId->Name = QApplication::Translate('Create User Id');
			$this->lblCreateUserId->Text = $this->objBuildVersion->CreateUserId;
			$this->lblCreateUserId->Format = $strFormat;
			return $this->lblCreateUserId;
		}

		/**
		 * Create and setup QIntegerTextBox txtStatus
		 * @param string $strControlId optional ControlId to use
		 * @return QIntegerTextBox
		 */
		public function txtStatus_Create($strControlId = null) {
			$this->txtStatus = new QIntegerTextBox($this->objParentObject, $strControlId);
			$this->txtStatus->Name = QApplication::Translate('Status');
			$this->txtStatus->Text = $this->objBuildVersion->Status;
			$this->txtStatus->Required = true;
			return $this->txtStatus;
		}

		/**
		 * Create and setup QLabel lblStatus
		 * @param string $strControlId optional ControlId to use
		 * @param string $strFormat optional sprintf format to use
		 * @return QLabel
		 */
		public function lblStatus_Create($strControlId = null, $strFormat = null) {
			$this->lblStatus = new QLabel($this->objParentObject, $strControlId);
			$this->lblStatus->Name = QApplication::Translate('Status');
			$this->lblStatus->Text = $this->objBuildVersion->Status;
			$this->lblStatus->Required = true;
			$this->lblStatus->Format = $strFormat;
			return $this->lblStatus;
		}



		/**
		 * Refresh this MetaControl with Data from the local BuildVersion object.
		 * @param boolean $blnReload reload BuildVersion from the database
		 * @return void
		 */
		public function Refresh($blnReload = false) {
			if ($blnReload)
				$this->objBuildVersion->Reload();

			if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objBuildVersion->Id;

			if ($this->txtProjectId) $this->txtProjectId->Text = $this->objBuildVersion->ProjectId;
			if ($this->lblProjectId) $this->lblProjectId->Text = $this->objBuildVersion->ProjectId;

			if ($this->txtMajorVersion) $this->txtMajorVersion->Text = $this->objBuildVersion->MajorVersion;
			if ($this->lblMajorVersion) $this->lblMajorVersion->Text = $this->objBuildVersion->MajorVersion;

			if ($this->txtMinorVersion) $this->txtMinorVersion->Text = $this->objBuildVersion->MinorVersion;
			if ($this->lblMinorVersion) $this->lblMinorVersion->Text = $this->objBuildVersion->MinorVersion;

			if ($this->txtHotPatch) $this->txtHotPatch->Text = $this->objBuildVersion->HotPatch;
			if ($this->lblHotPatch) $this->lblHotPatch->Text = $this->objBuildVersion->HotPatch;

			if ($this->txtReleaseCandidate) $this->txtReleaseCandidate->Text = $this->objBuildVersion->ReleaseCandidate;
			if ($this->lblReleaseCandidate) $this->lblReleaseCandidate->Text = $this->objBuildVersion->ReleaseCandidate;

			if ($this->calDateCreated) $this->calDateCreated->DateTime = $this->objBuildVersion->DateCreated;
			if ($this->lblDateCreated) $this->lblDateCreated->Text = sprintf($this->objBuildVersion->DateCreated) ? $this->objBuildVersion->DateCreated->qFormat($this->strDateCreatedDateTimeFormat) : null;

			if ($this->calDateModified) $this->calDateModified->DateTime = $this->objBuildVersion->DateModified;
			if ($this->lblDateModified) $this->lblDateModified->Text = sprintf($this->objBuildVersion->DateModified) ? $this->objBuildVersion->DateModified->qFormat($this->strDateModifiedDateTimeFormat) : null;

			if ($this->txtCreateUserId) $this->txtCreateUserId->Text = $this->objBuildVersion->CreateUserId;
			if ($this->lblCreateUserId) $this->lblCreateUserId->Text = $this->objBuildVersion->CreateUserId;

			if ($this->txtStatus) $this->txtStatus->Text = $this->objBuildVersion->Status;
			if ($this->lblStatus) $this->lblStatus->Text = $this->objBuildVersion->Status;

		}



		///////////////////////////////////////////////
		// PROTECTED UPDATE METHODS for ManyToManyReferences (if any)
		///////////////////////////////////////////////





		///////////////////////////////////////////////
		// PUBLIC BUILDVERSION OBJECT MANIPULATORS
		///////////////////////////////////////////////

		/**
		 * This will save this object's BuildVersion instance,
		 * updating only the fields which have had a control created for it.
		 */
		public function SaveBuildVersion() {
			try {
				// Update any fields for controls that have been created
				if ($this->txtProjectId) $this->objBuildVersion->ProjectId = $this->txtProjectId->Text;
				if ($this->txtMajorVersion) $this->objBuildVersion->MajorVersion = $this->txtMajorVersion->Text;
				if ($this->txtMinorVersion) $this->objBuildVersion->MinorVersion = $this->txtMinorVersion->Text;
				if ($this->txtHotPatch) $this->objBuildVersion->HotPatch = $this->txtHotPatch->Text;
				if ($this->txtReleaseCandidate) $this->objBuildVersion->ReleaseCandidate = $this->txtReleaseCandidate->Text;
				if ($this->calDateCreated) $this->objBuildVersion->DateCreated = $this->calDateCreated->DateTime;
				if ($this->calDateModified) $this->objBuildVersion->DateModified = $this->calDateModified->DateTime;
				if ($this->txtCreateUserId) $this->objBuildVersion->CreateUserId = $this->txtCreateUserId->Text;
				if ($this->txtStatus) $this->objBuildVersion->Status = $this->txtStatus->Text;

				// Update any UniqueReverseReferences (if any) for controls that have been created for it

				// Save the BuildVersion object
				$this->objBuildVersion->Save();

				// Finally, update any ManyToManyReferences (if any)
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}

		/**
		 * This will DELETE this object's BuildVersion instance from the database.
		 * It will also unassociate itself from any ManyToManyReferences.
		 */
		public function DeleteBuildVersion() {
			$this->objBuildVersion->Delete();
		}



		///////////////////////////////////////////////
		// PUBLIC GETTERS and SETTERS
		///////////////////////////////////////////////

		/**
		 * Override method to perform a property "Get"
		 * This will get the value of $strName
		 *
		 * @param string $strName Name of the property to get
		 * @return mixed
		 */
		public function __get($strName) {
			switch ($strName) {
				// General MetaControlVariables
				case 'BuildVersion': return $this->objBuildVersion;
				case 'TitleVerb': return $this->strTitleVerb;
				case 'EditMode': return $this->blnEditMode;

				// Controls that point to BuildVersion fields -- will be created dynamically if not yet created
				case 'IdControl':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'IdLabel':
					if (!$this->lblId) return $this->lblId_Create();
					return $this->lblId;
				case 'ProjectIdControl':
					if (!$this->txtProjectId) return $this->txtProjectId_Create();
					return $this->txtProjectId;
				case 'ProjectIdLabel':
					if (!$this->lblProjectId) return $this->lblProjectId_Create();
					return $this->lblProjectId;
				case 'MajorVersionControl':
					if (!$this->txtMajorVersion) return $this->txtMajorVersion_Create();
					return $this->txtMajorVersion;
				case 'MajorVersionLabel':
					if (!$this->lblMajorVersion) return $this->lblMajorVersion_Create();
					return $this->lblMajorVersion;
				case 'MinorVersionControl':
					if (!$this->txtMinorVersion) return $this->txtMinorVersion_Create();
					return $this->txtMinorVersion;
				case 'MinorVersionLabel':
					if (!$this->lblMinorVersion) return $this->lblMinorVersion_Create();
					return $this->lblMinorVersion;
				case 'HotPatchControl':
					if (!$this->txtHotPatch) return $this->txtHotPatch_Create();
					return $this->txtHotPatch;
				case 'HotPatchLabel':
					if (!$this->lblHotPatch) return $this->lblHotPatch_Create();
					return $this->lblHotPatch;
				case 'ReleaseCandidateControl':
					if (!$this->txtReleaseCandidate) return $this->txtReleaseCandidate_Create();
					return $this->txtReleaseCandidate;
				case 'ReleaseCandidateLabel':
					if (!$this->lblReleaseCandidate) return $this->lblReleaseCandidate_Create();
					return $this->lblReleaseCandidate;
				case 'DateCreatedControl':
					if (!$this->calDateCreated) return $this->calDateCreated_Create();
					return $this->calDateCreated;
				case 'DateCreatedLabel':
					if (!$this->lblDateCreated) return $this->lblDateCreated_Create();
					return $this->lblDateCreated;
				case 'DateModifiedControl':
					if (!$this->calDateModified) return $this->calDateModified_Create();
					return $this->calDateModified;
				case 'DateModifiedLabel':
					if (!$this->lblDateModified) return $this->lblDateModified_Create();
					return $this->lblDateModified;
				case 'CreateUserIdControl':
					if (!$this->txtCreateUserId) return $this->txtCreateUserId_Create();
					return $this->txtCreateUserId;
				case 'CreateUserIdLabel':
					if (!$this->lblCreateUserId) return $this->lblCreateUserId_Create();
					return $this->lblCreateUserId;
				case 'StatusControl':
					if (!$this->txtStatus) return $this->txtStatus_Create();
					return $this->txtStatus;
				case 'StatusLabel':
					if (!$this->lblStatus) return $this->lblStatus_Create();
					return $this->lblStatus;
				default:
					try {
						return parent::__get($strName);
					} catch (QCallerException $objExc) {
						$objExc->IncrementOffset();
						throw $objExc;
					}
			}
		}

		/**
		 * Override method to perform a property "Set"
		 * This will set the property $strName to be $mixValue
		 *
		 * @param string $strName Name of the property to set
		 * @param string $mixValue New value of the property
		 * @return mixed
		 */
		public function __set($strName, $mixValue) {
			try {
				switch ($strName) {
					// Controls that point to BuildVersion fields
					case 'IdControl':
						return ($this->lblId = QType::Cast($mixValue, 'QControl'));
					case 'ProjectIdControl':
						return ($this->txtProjectId = QType::Cast($mixValue, 'QControl'));
					case 'MajorVersionControl':
						return ($this->txtMajorVersion = QType::Cast($mixValue, 'QControl'));
					case 'MinorVersionControl':
						return ($this->txtMinorVersion = QType::Cast($mixValue, 'QControl'));
					case 'HotPatchControl':
						return ($this->txtHotPatch = QType::Cast($mixValue, 'QControl'));
					case 'ReleaseCandidateControl':
						return ($this->txtReleaseCandidate = QType::Cast($mixValue, 'QControl'));
					case 'DateCreatedControl':
						return ($this->calDateCreated = QType::Cast($mixValue, 'QControl'));
					case 'DateModifiedControl':
						return ($this->calDateModified = QType::Cast($mixValue, 'QControl'));
					case 'CreateUserIdControl':
						return ($this->txtCreateUserId = QType::Cast($mixValue, 'QControl'));
					case 'StatusControl':
						return ($this->txtStatus = QType::Cast($mixValue, 'QControl'));
					default:
						return parent::__set($strName, $mixValue);
				}
			} catch (QCallerException $objExc) {
				$objExc->IncrementOffset();
				throw $objExc;
			}
		}
	}
?>